﻿using System;
using System.Xml.Linq;
using System.Xml.Serialization;
using Microsoft.Cci;
using SpCop.Core;
using SpCop.Core.Model;

namespace SpCop.Model
{
    [Serializable]
    public class Feature : IVisitable<Feature>
    {
        public FeatureReference[] Dependencies;
        public Manifest[] ElementManifests;
        public Element[] Elements;
        public string[] Files;
        public string Folder;
        public Guid Id;

        [XmlIgnore] public Package Package;
        public string ReceiverTypeName;

        [XmlIgnore] public INamedTypeDefinition ReveiverType;
        public Scope Scope;
        public string Title;

        public XElement Xml;

        // for serialization
        public Feature()
        {
        }

        public Feature(string path)
        {
            Folder = path;
        }

       

        #region IVisitable<Feature> Members

        public void Accept(IVisitor<Feature> visitor)
        {
            visitor.Visit(this);
        }

        #endregion

    }

    public class FeatureReference
    {
        public Guid Id;
    }
}